package com.deductive.domain.special;

import com.deductive.common.config.mybatis.PgJsonbTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 舰船实体类
 * @TableName spatial_ship
 */
@ApiModel(value = "SpatialShip", description = "舰船信息")
@TableName(value ="spatial_ship",autoResultMap = true)
@Data
public class SpatialShip implements Serializable {
    /**
     * ID
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "舰船名称", example = "辽宁号")
    @TableField(value = "name")
    private String name;

    /**
     * 类型
     */
    @ApiModelProperty(value = "舰船类型", example = "航空母舰")
    @TableField(value = "type")
    private String type;

    /**
     * 编制等级
     */
    @ApiModelProperty(value = "编制等级", example = "一级")
    @TableField(value = "preparation_level")
    private String preparationLevel;

    /**
     * 满载排水量
     */
    @ApiModelProperty(value = "满载排水量", example = "67500吨")
    @TableField(value = "full_load_displacement")
    private String fullLoadDisplacement;

    /**
     * 舰艇长度
     */
    @ApiModelProperty(value = "舰艇长度(米)", example = "305.0")
    @TableField(value = "ship_length")
    private Double shipLength;

    /**
     * 舰艇宽度
     */
    @ApiModelProperty(value = "舰艇宽度(米)", example = "75.0")
    @TableField(value = "ship_width")
    private Double shipWidth;

    /**
     * 吃水深度
     */
    @ApiModelProperty(value = "吃水深度(米)", example = "10.5")
    @TableField(value = "water_depth")
    private Double waterDepth;

    /**
     * 航速
     */
    @ApiModelProperty(value = "航速(节)", example = "32.0")
    @TableField(value = "speed")
    private Double speed;

    /**
     * 续航能力
     */
    @ApiModelProperty(value = "续航能力", example = "45天")
    @TableField(value = "endurance")
    private String endurance;

    /**
     * 作战半径
     */
    @ApiModelProperty(value = "作战半径", example = "1000海里")
    @TableField(value = "operational_radius")
    private String operationalRadius;

    /**
     * 父Id
     */
    @ApiModelProperty(value = "父Id")
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "修改时间", example = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 其他数据
     */
    @ApiModelProperty(value = "其他数据(JSON格式)", example = "{\"weapons\": [\"舰载机\", \"导弹\"], \"crew\": 2000}")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "other_data", typeHandler = PgJsonbTypeHandler.class)
    private JSONObject otherData;

    @ApiModelProperty(value = "3d模型Id", example = "1")
    @TableField(value = "model3d_id")
    private Long model3DId;


    /**
     * 模型url路径
     */
    @ApiModelProperty(value = "模型url路径")
    @TableField(exist = false)
    private String modelUrl;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}